/* 主内容区样式 */
#article-detail {
    max-width: 800px;
    margin: 2em auto;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#article-detail h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: #333;
}

#article-detail p {
    font-size: 1em;
    color: #666;
    margin-bottom: 1em;
}

#article-author,
#article-publish-date,
#article-category {
    color: #888;
    font-style: italic;
    font-size: 0.9em;
    margin-bottom: 0.5em;
}

/* 文章内容样式 */
#article-content {
    line-height: 1.6em;
    color: #333;
    margin-bottom: 1.5em;
}

/* 标签样式 */
#article-tags {
    color: #4A90E2;
    font-weight: bold;
}

#article-tags span {
    background-color: #f1f1f1;
    color: #4A90E2;
    padding: 0.3em 0.6em;
    border-radius: 5px;
    margin-right: 0.5em;
    font-size: 0.9em;
}

/* 通用按钮样式 */
button {
    padding: 0.8em 2em;
    font-size: 1em;
    background-color: #ff7f50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #ff4500;
}

/* 底部样式 */
footer {
    background-color: #4A90E2;
    color: white;
    padding: 1em;
    text-align: center;
}

/* 返回按钮样式 */
#back-to-resources {
    display: inline-block;
    margin-top: 2em;
    padding: 0.8em 2em;
    font-size: 1em;
    background-color: #4A90E2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

/* 鼠标悬停效果 */
#back-to-resources:hover {
    background-color: #357ABD;
    transform: scale(1.05);
}

/* 按钮在小屏幕上的适应性 */
@media (max-width: 600px) {
    #back-to-resources {
        width: 100%;
        padding: 1em 0;
    }
}

#action-buttons {
    margin-top: 1em;
    display: flex;
    gap: 1em;
    justify-content: center;
}

#action-buttons button {
    padding: 0.6em 1.5em;
    font-size: 1em;
    background-color: #4A90E2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#action-buttons button:hover {
    background-color: #357ABD;
}

#comments-section {
    margin-top: 30px;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

#comments-list .comment {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.comment .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.comment-details {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
}

.username {
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-text {
    margin: 5px 0;
}

.timestamp {
    font-size: 0.8em;
    color: #888;
    text-align: right;
}

#add-comment {
    margin-top: 20px;
}

#add-comment textarea {
    width: 100%;
    height: 80px;
    margin-bottom: 10px;
}

#add-comment button {
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#add-comment button:hover {
    background-color: #45a049;
}

.comment {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

.comment-header {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;   /* 控制头像大小 */
    height: 40px;
    border-radius: 50%; /* 圆形头像 */
    margin-right: 10px;  /* 头像和内容之间的间距 */
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: bold;
}

.timestamp {
    font-size: 0.8em;
    color: #888;
}

.comment-text {
    margin-top: 5px;
    font-size: 1em;
}
